a,b = map(int,raw_input().split())
if a >= b:
    print a
else:
    print b/a
